<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:sf="http://www.springframework.org/tags/faces"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/tags"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	
	
<sec:authorize ifNotGranted="ROLE_SUPERVISOR, ROLE_USER">
	<div class="hided" id="nav_manual">
		<div class="rnav ui-state-default login">
			<div class="span-5" style="padding-top: 20px;">
				<p>Valid username/passwords are:</p>
				<ul>
					<li>admin/admin</li>
				    <li>user/user</li>
				    <li>guest/guest</li>
				</ul>
			</div>
			<div class="span-10 append-2 last w100">
				<c:if test="${not empty sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}">
						<div class="error">
							Your login attempt was not successful, try again.<br />
							Reason: #{sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
						</div>
				</c:if>
				<form name="f" action="${request.contextPath}/web/loginProcess" method="post">
					<fieldset>
						<legend>Login Information</legend>
							<p>
								User:
								<br />
								<c:if test="${not empty param.login_error}">
									<c:set var="username" value="${sessionScope.SPRING_SECURITY_LAST_USERNAME}"/>
								</c:if>
								<input type="text" name="j_username" value="#{username}"/>
							</p>
							<p>
								Password:
								<br />
								<input type="password" name="j_password" />				
							</p>
							<p>
								<input type="checkbox" name="_spring_security_remember_me"/> 
								Don't ask for my password for two weeks:
							</p>
							<p>
								<input name="submit" type="submit" value="Login" />
							</p>
					</fieldset>
				</form>
			</div>
		</div>	    
	</div>
</sec:authorize>
</ui:composition>